package com.costeaalex.datedrivenfilecopy.factories;

/**
 * @author Alex Costea
 * 
 * Copy factory: feeds a copier to the CopyModel depending on the copy type.
 * 
 */


import com.costeaalex.datedrivenfilecopy.model.copiers.FTPCopier;
import com.costeaalex.datedrivenfilecopy.model.copiers.NormalCopier;
import com.costeaalex.datedrivenfilecopy.model.interfaces.ICopier;

public class CopierFactory {
	
	private String[] connectionData;
	
	public void setFTPConnectionData(String[] connectionData) {
		this.connectionData=connectionData;
	}
	
	public ICopier getCopier(int type) {
		switch(type) {
		case 1:
			return new NormalCopier();
		case 2:
			return new FTPCopier(connectionData);
		}
		return null;
	}
}
